Repository navigation
Fix dropped images in Anthropic tool results - #73
Open
PhunsukhWangdu2002 wants to merge 1 commit into
Open
PhunsukhWangdu2002 wants to merge 1 commit into
PhunsukhWangdu2002 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How this surfaced
Claude Code fell back to OCR when asked to inspect a local image through the Command Code proxy on macOS, while DSH could send images through the same proxy. A text-free two-color PNG isolated two separate issues: switching Claude to the vision-capable DeepSeek V4.1 Flash route made direct image attachments work through Anthropic Messages, but the Anthropic converter still discarded image blocks nested inside
tool_resultbecause it only extracted text.What changed
Preserve tool-result text and IDs, then forward the extracted images as native image blocks in a user message after all tool results in that batch. The Anthropic path now applies the existing tool-image size limits and per-request budget. A regression test checks that parallel tool results remain adjacent and that the image reaches the upstream payload as an image.
Validation
npm teston macOS: 147 tests passed.The live checks exercised the configured API routes directly, without driving the desktop UI. Client model configuration is outside the scope of this PR.